import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import ManagerView from '@/views/Manager/manager.vue'
import TukuView from '@/views/Manager/tuku/tuku.vue'
import GoodsView from '@/views/Manager/goods/goods.vue'
import PackagesView from '@/views/Manager/goods/packages.vue'
import AddGoodView from '@/views/Manager/goods/addGood.vue'
import RecordsView from '@/views/Manager/record/record.vue'
import RecordDetailView from '@/views/Manager/record/recordDetail.vue'
import UploadView from '@/views/Manager/tuku/uploadView.vue'
import GoodBaseView from '@/views/Manager/goods/goodBaseView.vue'
import GoodImgView from '@/views/Manager/goods/goodImgView.vue'
import GoodDescView from '@/views/Manager/goods/goodDescView.vue'
import EditGoodView from '@/views/Manager/goods/editGood.vue'
import MainMangerView from '@/views/Manager/mainShow/mainShow.vue'
import SwipperView from '@/views/Manager/mainShow/swipper.vue'
import DiscountView from '@/views/Manager/mainShow/discount.vue'
import HotView from '@/views/Manager/mainShow/hot.vue'
import BoardView from '@/views/Manager/board/board.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/manager',
    component: ManagerView,
    children: [
      {
        path:'mainShow',
        component:MainMangerView,
        children:[
          {
            path:'swipper',
            component:SwipperView
          },
          {
            path:'discount',
            component:DiscountView
          },
          {
            path:'hot',
            component:HotView
          },
        ]
      },
      {
        path:'tuku',
        component:TukuView
      },
      {
        path:'board',
        component:BoardView
      },
      {
        path:'imageUpload',
        component:UploadView
      },
      {
        path:'goods',
        component:GoodsView
      },
      {
        path:'records',
        component:RecordsView
      },
      {
        path:'recordDetail',
        component:RecordDetailView
      }
      ,
      {
        path:'packages',
        component:PackagesView
      },
      {
        path:'editGood',
        component:EditGoodView
      },
      {
        path:'addGood',
        component:AddGoodView,
        children:[
          {
            path:'goodBase',
            component:GoodBaseView
          },
          {
            path:'goodDesc',
            component:GoodDescView
          },
          {
            path:'goodImg',
            component:GoodImgView
          }
        ]
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
